package adminorg;
import java.util.logging.*;

public class AEHelper {
	public final static Logger logger = Logger.getLogger(AEHelper.class
            .getName());
	
	public static void logInfo(String message)
	{
		synchronized(logger)
		{
		   logger.log(Level.WARNING,message);
		}
	}
	public static void logException(Exception e,String place)
	{
		synchronized(logger)
		{
		   logger.log(Level.WARNING,place+":"+e.getMessage());
		   e.printStackTrace();
		}
	}
   public static void logArray(Object[] dat,String comment)
   {
	   StringBuilder s=new StringBuilder();
	   s.append(comment);
	   if (dat==null) s.append("=null=");
	   else
	   {  
	      s.append('[');
	      int n=dat.length;
	      for(int i=0;i<n;i++)
	      {
	    	  Object a = dat[i];
	    	  if (a==null) s.append("null");
	    	  else s.append(a.toString());
	    	  s.append(i==n-1?']':',');
	      }
	   }
	   System.out.println(s.toString());
   }
}
